using System;
using System.Collections.Generic;
using System.Text;
using NHMA = NHibernate.Mapping.Attributes;
using Iesi.Collections;

namespace infoMECHANICA.NHibernateORM.TestMappings
{
    /// <summary>
    /// NHibernate mappings of database Employees
    /// </summary>
    [NHMA.Class(Table = "Employees")]
    public partial class Employee
    {
        private int _EmployeeId;
        private Company _Company;
        private Job _Job;
        private string _FirstName;
        private string _LastName;
        private DateTime _DateOfBirth;
        private int _Salary;


        /// <summary>
        /// Database entity of EmployeeId column
        /// This is also unique identifier of Employees table
        /// </summary>
        [NHMA.Id(1, Name="EmployeeId", Column = "EmployeeId")]
        [NHMA.Generator(2, Class = "native")]
        public virtual int EmployeeId
        {
            get { return this._EmployeeId; }
            set { this._EmployeeId = value; }		    
        }        
 
        /// <summary>        
        /// Foreign key reference to Companies table
        /// </summary>        
        [NHMA.ManyToOne(Column = "CompanyId", Lazy = NHMA.Laziness.Proxy, Class = "infoMECHANICA.NHibernateORM.TestMappings.Company, infoMECHANICA.NHibernateORM.TestMappings")]  
        public virtual Company Company        
        {
            get { return this._Company; }
            set { this._Company = value; }		    
        }        
 
        /// <summary>        
        /// Foreign key reference to Jobs table
        /// </summary>        
        [NHMA.ManyToOne(Column = "JobId", Lazy = NHMA.Laziness.Proxy, Class = "infoMECHANICA.NHibernateORM.TestMappings.Job, infoMECHANICA.NHibernateORM.TestMappings")]  
        public virtual Job Job        
        {
            get { return this._Job; }
            set { this._Job = value; }		    
        }        
 
        /// <summary>
        /// Database entity of FirstName column
        /// </summary>
        [NHMA.Property(Column = "FirstName", NotNull=true)]
        public virtual string FirstName
        {
            get { return this._FirstName; }
            set { this._FirstName = value; }		    
        }        
 
        /// <summary>
        /// Database entity of LastName column
        /// </summary>
        [NHMA.Property(Column = "LastName", NotNull=true)]
        public virtual string LastName
        {
            get { return this._LastName; }
            set { this._LastName = value; }		    
        }        
 
        /// <summary>
        /// Database entity of DateOfBirth column
        /// </summary>
        [NHMA.Property(Column = "DateOfBirth", NotNull=true)]
        public virtual DateTime DateOfBirth
        {
            get { return this._DateOfBirth; }
            set { this._DateOfBirth = value; }		    
        }        
 
        /// <summary>
        /// Database entity of Salary column
        /// </summary>
        [NHMA.Property(Column = "Salary", NotNull=true)]
        public virtual int Salary
        {
            get { return this._Salary; }
            set { this._Salary = value; }		    
        }        

    }
}
